/*
 * @Descripttion: 聚焦模式动作
 * @version:
 * @Author: 周志国
 * @Date: 2021-05-13 15:10:48
 * @LastEditors: 周志国
 * @LastEditTime: 2021-05-13 16:46:39
 * @changeLog:
 * @FilePath: /anov-next/src/assets/js/app/config/action/subs/focus.js
 */
const focusAction = [
  {
    id: 'focusServer.toggleOpen',
    name: '开启或关闭聚焦模式',
    type: 'system',
    exec: (app) => {
      app.focusServer.isOpen = !app.focusServer.isOpen
    }
  },
  {
    id: 'focusServer.toggleCarousel',
    name: '开启或关闭智能解说',
    type: 'system',
    exec: (app) => {
      app.focusServer.carousel = !app.focusServer.carousel
    }
  },
  // added by WUYAX @2021-06-30
  {
    id: 'focusServer.activated',
    name: '聚焦',
    type: 'system',
    exec: (app, param) => {
      app.focusServer.isOpen = true
      // @parm components routeName.id
      app.focusServer.activated(param)
    }
  },
  {
    id: 'focusServer.inactivated',
    name: '失焦',
    type: 'system',
    exec: (app) => {
      app.focusServer.inactivated()
    }
  }
]
export default focusAction
